package a.h;

import a.c.z;

import javax.imageio.ImageIO;
import java.awt.*;
import java.awt.image.BufferedImage;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Collection;

public class mc
  extends gc
{
  public static final String y = "ImageOptionItem.renderer";
  public static final String z = "ImageOptionItem.allowBrowse";
  public static final String A = "ImageOptionItem.allowEmptyImage";
  public static final String B = "ImageOptionItem.autoUpdateImageList";
  private sb C;
  private a_ D;
  static Class E;
  public static int F;
  
  public void a(a_ parama_)
  {
    this.D = parama_;
  }
  
  public String n()
  {
    return "URLImage";
  }
  
  public a_ b()
  {
    return this.D;
  }
  
  private void a(Image paramImage, URL paramURL)
  {
    a(new ed(paramImage, paramURL));
  }
  
  private void a(ed paramed)
  {
    this.D.a(paramed);
  }
  
  public mc(String paramString, a_ parama_, Object paramObject)
  {
    super(paramString, paramObject);
    if (ec.t == 0) {}
    a(E == null ? (mc.E = f("a.h.ed")) : E);
    this.D = parama_;
    a("ImageOptionItem.allowBrowse", Boolean.TRUE);
    a("ImageOptionItem.allowEmptyImage", Boolean.TRUE);
    a("ImageOptionItem.autoUpdateImageList", Boolean.FALSE);
    this.C = new sb(null, 24, 24);
    a("ImageOptionItem.renderer", this.C);
    a(cd.d, this.C);
    a(cd.c, new ld(this, null));
  }
  
  public mc(String paramString, Object paramObject)
  {
    super(paramString, paramObject);
    if (ec.t == 0) {}
    a(E == null ? (mc.E = f("a.h.ed")) : E);
    this.D = new hb(new z());
    a("ImageOptionItem.allowBrowse", Boolean.TRUE);
    a("ImageOptionItem.allowEmptyImage", Boolean.TRUE);
    a("ImageOptionItem.autoUpdateImageList", Boolean.FALSE);
    this.C = new sb(null, 24, 24);
    a("ImageOptionItem.renderer", this.C);
    a(cd.d, this.C);
    a(cd.c, new ld(this, null));
  }
  
  public void a(Object paramObject)
  {
    int i = ec.t;
    boolean bool = ec.s;
    Object localObject = paramObject;
    if (i == 0)
    {
      if ((paramObject instanceof Image))
      {
        localObject = new ed((Image)paramObject, null);
        if (i != 0) {
          break label118;
        }
        if (!bool) {
          break label101;
        }
      }
      if (i != 0) {}
    }
    else if ((paramObject instanceof URL))
    {
      BufferedImage localBufferedImage = null;
      try
      {
        localBufferedImage = ImageIO.read((URL)paramObject);
      }
      catch (IOException localIOException)
      {
        localBufferedImage = null;
      }
      localObject = new ed(localBufferedImage, (URL)paramObject);
      if (i != 0) {
        break label118;
      }
      if (!bool) {
        break label101;
      }
    }
    localObject = paramObject;
    label101:
    super.a(localObject);
    label118:
    if ((i != 0) || ((((Boolean)c("ImageOptionItem.autoUpdateImageList")).booleanValue()) && ((localObject instanceof ed)))) {
      a((ed)localObject);
    }
  }
  
  public Object o()
  {
    Object localObject = super.o();
    return localObject;
  }
  
  public Image q()
  {
    int i = ec.t;
    Object localObject = o();
    if (i == 0) {
      if ((localObject instanceof Image)) {
        return (Image)localObject;
      }
    }
    if ((i != 0) || ((localObject instanceof ed))) {
      return ((ed)localObject).a();
    }
    return null;
  }
  
  public void b(String paramString)
  {
    int i = ec.t;
    boolean bool = ec.s;
    if (i == 0) {
      if ("<NONE>".equals(paramString))
      {
        a(null);
        if ((i == 0) && (!bool)) {
          return;
        }
      }
    }
    if (i == 0)
    {
      if ("<null/>".equals(paramString)) {
        a(null);
      }
    }
    else if ((i == 0) && (!bool)) {
      return;
    }
    try
    {
      a(new URL(paramString));
    }
    catch (MalformedURLException localMalformedURLException)
    {
      localMalformedURLException.printStackTrace();
    }
  }
  
  public String h()
  {
    int i = ec.t;
    if (i == 0) {
      if (this.u == null) {
        return "<NONE>";
      }
    }
    if ((i != 0) || ((this.u instanceof ed)))
    {
      URL localURL = ((ed)this.u).b();
      if ((i != 0) || (localURL != null)) {
        return localURL.toString();
      }
      return "<null/>";
    }
    return "";
  }
  
  public boolean r()
  {
    int i = ec.t;
    if ((i != 0) || (this.u != null))
    {
      if ((i == 0) && (!(this.u instanceof ed))) {
        break label50;
      }
      if (i != 0) {
        break label47;
      }
    }
    label47:
    label50:
    return ((ed)this.u).c();
  }
  
  static Class f(String paramString)
  {
    try
    {
      return Class.forName(paramString);
    }
    catch (ClassNotFoundException localClassNotFoundException)
    {
      throw new NoClassDefFoundError(localClassNotFoundException.getMessage());
    }
  }
  
  public static abstract interface a_
  {
    public abstract Collection a();
    
    public abstract void a(Image paramImage);
    
    public abstract void a(URL paramURL);
    
    public abstract void a(ed paramed);
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.h.mc

 * JD-Core Version:    0.7.0.1

 */